--[[
   create at 2019-02-28 11:52:20
   author:YanHe
   @brief:
--]]
require "kuru_makeup.lua"
--call once when scene loaded
config = {

laughLine = 0.42,
eyeLut = 0.35,
eyePlim = 0.08,
darkCircle = 0.87,
whiteTeeth = 0.42,
blushBlendMode = BlendMode.Normal,
eyeColorBlendMode = BlendMode.None,

--eyebrow blend mode
eyeBrowsBlendMode = BlendMode.Multiply,

--eyeShadowBlendMode
eyeShadowLayer0BlendMode = BlendMode.Multiply,
eyeShadowLayer1BlendMode = BlendMode.Screen,
eyeShadowLayer2BlendMode = BlendMode.Multiply,

--eyeLinerBlendMode
eyeLinerBlendMode = BlendMode.Multiply,

--eyeLashesBlendMode
eyeLashesBlendMode = BlendMode.Multiply,

faceContour = 0.62,
cheek = 0.42,
lip = 0.6,
colorLens = 0.4,
eyeBrow = 0.30,
eyeShadow = 0.5,
eyeLiner = 0.36,
eyeLashes = 0.36,
--Lut Filter
LUT_NAME = "lut.png",
lutStrength = 0,
applyOnlyFilter = false,

}
function initialize(scene)

  g_makeup = KuruMakeUp:init(MakeUpType.makeupType_normal,config)
  makeUpNode = g_makeup:createNode()
  addNodeAndRelease(scene,makeUpNode) 
  g_makeup.test = "hehe"

  print("ceshi"..g_makeup.test)
end

--call every frame,elapsed time is the time elapsed this frame
function frameReady(scene,elapsedTime)

  g_makeup:update(scene,1.0)

end

--call when reset scene,e.g switch to rear camera
function reset(scene)
 

end

--call when scene close
function finalize(scene)
 
end

--call when touch screen
function onTouchDown(event)
 
end

function addNodeAndRelease(scene, node)
  scene:addNode(node)
  node:release()
  return node
end

function addChildAndRelease(parent, child)
  parent:addChild(child)
  child:release()
  return child
end
